import 'package:flutter/material.dart';

import 'login.dart';

class Welcome extends StatefulWidget {
  Welcome({Key key, this.title}) : super(key: key);

  final String title;

  @override
  State<StatefulWidget> createState() {
    return WelcomeState();
  }
}

class WelcomeState extends State<Welcome> {
  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: SingleChildScrollView(
        child: Column(
          children: <Widget>[
            Container(
              width: 237,
              height: 234,
              margin: EdgeInsets.fromLTRB(68, 104, 68, 55),
              decoration: BoxDecoration(
                  image: DecorationImage(
                      image: Image.asset("assets/images/course/class_bg.png").image,
                      fit: BoxFit.fill)),
            ),
            MaterialButton(
              child: Container(
                width: 209,
                height: 36,
                alignment: Alignment.center,
                decoration: BoxDecoration(
                  borderRadius: BorderRadius.circular(8),
                  color: Color(0xff2252F6),
                ),
                margin: EdgeInsets.fromLTRB(0,47,0,20),
                child: Text("跳过",
                  style: TextStyle(color: Color(0xffFFFFFF), fontSize: 14),
                ),
              ),
              onPressed: () {
                Navigator.push(context, MaterialPageRoute(builder: (context) => Login(2)));
              },
            )
          ],
        ),
      )
    );
  }

  @override
  void dispose() {
    super.dispose();
  }
}
